package Eyjafjalla.card.power;

import Eyjafjalla.action.InheritAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.card.skill.Inherit_Eyjafjalla;
import Eyjafjalla.card.skill.Marshmallow_Eyjafjalla;
import Eyjafjalla.card.status.Cloud_Eyjafjalla;
import Eyjafjalla.power.AdeleFixPower;
import Eyjafjalla.power.AdelePower;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.MakeTempCardInHandAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class SoLongAdele_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "SoLongAdele_Eyjafjalla";
    private static final CardStrings cardStrings;

    public SoLongAdele_Eyjafjalla(){
        super(ID, cardStrings.NAME,2,cardStrings.DESCRIPTION,CardType.POWER,CardRarity.RARE,CardTarget.SELF);
        this.baseMagicNumber = 1;
        this.magicNumber = 1;
        this.cardsToPreview = new Cloud_Eyjafjalla();
        cardsToPreview.upgrade();
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new SoLongAdele_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new ApplyPowerAction(p,p,new AdelePower(p,magicNumber),magicNumber));
        if(isFire()){
            addToBot(new MakeTempCardInHandAction(cardsToPreview,2));
        }
    }


    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeBaseCost(1);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}



